Skip to content

Fix Jekyll build crash and clean up navbar/about page#1

Merged
jwtoney merged 2 commits into
mainfrom
copilot/fix-deploy-workflow-error
Feb 24, 2026
Merged

Fix Jekyll build crash and clean up navbar/about page#1
jwtoney merged 2 commits into
mainfrom
copilot/fix-deploy-workflow-error

Conversation

Copilot AI commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

The Deploy workflow was failing with Liquid Exception: undefined method '[]' for nil in _layouts/about.liquid because announcements: enabled: true triggers a news section render that performs Liquid math on site.max_width ("930px" string), producing nil and crashing the build.

Changes

  • _pages/about.md

    • Disable announcements (enabled: false) — fixes the build crash
    • Replace placeholder subtitle with real content
    • Remove template boilerplate paragraph (Font Awesome/social media instructions)
  • Navbar cleanup — set nav: false on pages the owner doesn't want exposed:

    • _pages/repositories.md
    • _pages/profiles.md
    • _pages/blog.md
    • _pages/dropdown.md (submenu with bookshelf/blog)
    • _pages/teaching.md

Navbar will now only surface: about · publications · projects · cv.

.github/workflows/prettier.yml already set to workflow_dispatch only — no change needed.

Original prompt

Problem

The "Deploy site" GitHub Actions workflow is failing on every push with this error:

Liquid Exception: undefined method `[]' for nil in _layouts/about.liquid

This is an al-folio Jekyll theme site. The build crashes during Jekyll build. Additionally, the site has a lot of template/placeholder content that needs to be cleaned up per the owner's preferences.

Root Cause

The _pages/about.md front matter has announcements: enabled: true, but looking at _layouts/about.liquid, the announcements section calls {% include news.liquid limit=true %} which iterates over site.news. The _news collection directory appears to be empty or contains template content with references that break when the about page's announcements section tries to render them in the context of the layout.

More importantly, looking at the _layouts/about.liquid template, line 28 has:

{% capture sizes %}(min-width: {{ site.max_width }}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px)
      30vw, 95vw"{% endcapture %}

The site.max_width is set to 930px (a string with "px" suffix) in _config.yml. When Liquid tries to do site.max_width | minus: 30, it's trying to subtract 30 from "930px" which is a string, not a number. This causes nil to propagate and ultimately crashes with undefined method '[]' for nil.

Required Changes

1. Fix the build error in _config.yml

Change max_width from 930px to 930px is actually fine for CSS but causes issues in Liquid math. The real fix: ensure the profile section doesn't crash. Set announcements: enabled: false in _pages/about.md since there are no real news items, and disable latest_posts as well.

2. Clean up _pages/about.md

Current file at HEAD (commit 52b3aac136e3911bc52d27779fa3bab8198b69ea):

---
layout: about
title: about
permalink: /
subtitle: <a href='#'>Affiliations</a>. Address. Contacts. Motto. Etc.

profile:
  align: right
  image: prof_pic.jpg
  image_circular: true

selected_papers: false
social: true

announcements:
  enabled: true
  scrollable: true
  limit: 5
---

Hi! I'm Jacob, and I'm excited that I get to spend every day learning.
...

Link to your social media connections, too. This theme is set up to use [Font Awesome icons](https://fontawesome.com/) and [Academicons](https://jpswalsh.github.io/academicons/), like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them.

Changes needed:

  • Change subtitle from template placeholder to something real (e.g., PhD Candidate, Chemical Engineering & Computational Science, MIT)
  • Set announcements: enabled: false (no real news items exist)
  • Remove the last paragraph which is template boilerplate text ("Link to your social media connections, too...")

3. Remove unwanted pages from navbar

The owner does NOT want these pages: repositories, teaching, people, bookshelf, blog, or the submenu dropdown.

For each of these pages, set nav: false in their front matter so they don't appear in the navbar:

  • _pages/repositories.md: Change nav: truenav: false
  • _pages/profiles.md (people page): Change nav: truenav: false
  • _pages/blog.md: Change nav: truenav: false
  • _pages/dropdown.md (submenu with bookshelf/blog): Change nav: truenav: false

The books page (_pages/books.md) already has nav: false, so no change needed there.

4. Update _pages/teaching.md if it exists

Search for a teaching page and set nav: false on it too. It may be at _pages/teaching.md or similar.

5. Disable the Prettier workflow

Change .github/workflows/prettier.yml to only trigger on workflow_dispatch (manual trigger only), removing the push and pull_request triggers. Check if this was already done - if the file currently has only workflow_dispatch, leave it alone.

6. Clean up template placeholder content

In _data/cv.yml, the entire file contains Albert Einstein's placeholder data. This shouldn't cause a build failure but is worth noting - leave it for now since the owner can update it later.

7. Remove leftover template text from about page

The last line of _pages/about.md body content says "Link to your social media connections, too. This theme is set up to use Font Awesome icons and Academicons, like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them." - this needs to be removed.

Summary of files to modify

  1. _pages/about.md - Fix subtitle, disable announcements, remove template boilerplate text
  2. _pages/repositories.md - Set nav: false
  3. _pages/profiles.md - Set nav: false
  4. _pages/blog.md - Set nav: false
  5. _pages/dropdown.md - Set nav: false
  6. Any teaching page - Set nav: false
  7. .github/workflows/prettier.yml - Ensure only manual trigger (may already be done)

The goal is to get the Deploy site workfl...

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jwtoney <123672274+jwtoney@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix deploy site workflow failing due to liquid exception Fix Jekyll build crash and clean up navbar/about page Feb 24, 2026
Copilot AI requested a review from jwtoney February 24, 2026 01:51
@jwtoney jwtoney marked this pull request as ready for review February 24, 2026 02:01
@jwtoney jwtoney merged commit fc46ee1 into main Feb 24, 2026
4 of 5 checks passed
@jwtoney jwtoney deleted the copilot/fix-deploy-workflow-error branch February 24, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants